]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Skip property animations while hidden
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 10 Sep 2019 13:28:42 +0000 (15:28 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 10 Sep 2019 14:41:26 +0000 (14:41 +0000)
For implicit animations, Clutter will skip any transitions while
an actor is unmapped, and just set the property directly. Do the
same in our ease_property() convencience method.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/708

js/ui/environment.js

index 0c291b0a20d6f9da499021a0350b04301d49ebfc..bf5b7cb4dd2a0d505907a7aa817126b75e3403cd 100644 (file)
@@ -139,6 +139,11 @@ function _easeActorProperty(actor, propName, target, params) {
         params.duration = adjustAnimationTime(params.duration);
     let duration = Math.floor(params.duration || 0);
 
+    // Copy Clutter's behavior for implicit animations, see
+    // should_skip_implicit_transition()
+    if (actor instanceof Clutter.Actor && !actor.mapped)
+        duration = 0;
+
     let callback = _makeEaseCallback(params);
 
     // cancel overwritten transition